package com.vcms.cms.entity;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * GuestbookCtg entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "guestbook_ctg", catalog = "vcms_0.1")
public class GuestbookCtg implements java.io.Serializable {

	// Fields

	private Integer guestbookCtgId;
	private String ctgName;
	private Integer priority;
	private String description;
	private Set<Guestbook> guestbooks = new HashSet<Guestbook>(0);

	// Constructors

	/** default constructor */
	public GuestbookCtg() {
	}

	/** full constructor */
	public GuestbookCtg(String ctgName, Integer priority, String description,
			Set<Guestbook> guestbooks) {
		this.ctgName = ctgName;
		this.priority = priority;
		this.description = description;
		this.guestbooks = guestbooks;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "guestbookCtgId", unique = true, nullable = false)
	public Integer getGuestbookCtgId() {
		return this.guestbookCtgId;
	}

	public void setGuestbookCtgId(Integer guestbookCtgId) {
		this.guestbookCtgId = guestbookCtgId;
	}

	@Column(name = "ctgName", length = 100)
	public String getCtgName() {
		return this.ctgName;
	}

	public void setCtgName(String ctgName) {
		this.ctgName = ctgName;
	}

	@Column(name = "priority")
	public Integer getPriority() {
		return this.priority;
	}

	public void setPriority(Integer priority) {
		this.priority = priority;
	}

	@Column(name = "description", length = 500)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "guestbookCtg")
	public Set<Guestbook> getGuestbooks() {
		return this.guestbooks;
	}

	public void setGuestbooks(Set<Guestbook> guestbooks) {
		this.guestbooks = guestbooks;
	}

}